import axios from '@/libs/request/axios'
export function getRoleTypeData(params) {
    return axios.request({
        url: '/channel/roleType/getRoleTypeData',
        method: 'POST',
        data: params
    })
}

export function save(params) {
    return axios.request({
        url: '/channel/roleType/save',
        method: 'POST',
        data: params
    })
}
// 删除角色
export const deleteRoleType = (id, params) => {
    return axios.request({
        url: `/channel/roleType/deleteRoleType/${id}`,
        params: params,
        method: 'delete'
    })
}
// 清除无效角色
export function resetRole(params) {
    return axios.request({
        url: '/channel/roleType/resetRole',
        method: 'POST',
        data: params
    })
}

export function getAllRole() {
    return axios.request({
        url: '/channel/roleType/getAllRole',
        method: 'POST',
    })
}
